/*
Hermes Core: General Purpose Mobile Agent Platform
Copyright (C) 2006 UNICAM - Università degli Studi di Camerino

Group leaders: Flavio Corradini and Emanuela Merelli

Developers: Ezio Bartocci, Diego Bonura, Rosario Culmone,
Davide Lorenzoli, Leonardo Mariani, Francesca Piersigilli, 
Lorenzo Scortichini, Leonardo Vito.

GNU Lesser Public License

This library is free software; you can redistribute it 
and/or modify it under the terms of the GNU Lesser General 
Public License as published by the Free Software Foundation, 
version 2.1 of the License.

This library is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public 
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.

Emanuela Merelli
Dipartimento di Matematica ed Informatica
Università di Camerino
via Madonna delle Carceri, 62032 Camerino, Italy
E.Mail: emanuela.merelli@unicam.it
*/
package hermesV2.basicServices.discovery;

import hermesV2.agent.AbstractProtocol;
import hermesV2.agent.Identificator;
/**
 * This is the interface of the discovery component that offers the possibility
 * to search service agents into the current place.
 *
 * @author Diego Bonura
 */
public interface DiscoveryServiceAgents {
    /**
     * Returns the identificator of a Service agent registered in the discovery
     * component. The match is made with the key word.
     *
     * @param keyWord The key word to match.
     *
     * @return The Service Agent Identificator corresponding to the key word
     *         otherwise if no service agent match null.
     */
    public Identificator getServiceId(String keyWord);

    /**
     * Searches the service agent into the discovery component and returns the
     * first agent that match (the match isn't case sensitive) the key words
     * array.
     *
     * @param keyWordsArray An array of words to search into the description of
     *        every service agents registered into the component.
     *
     * @return The identificator of the service agent matched or null if no
     *         service is found.
     */
    public Identificator getServiceId(String[] keyWordsArray);

    /**
     * Returns the description (array of key words) of the service agent
     * registered into the component.
     *
     * @param agentId The identificator of the service agent.
     *
     * @return The description associated.
     */
    public String[] getServiceDescription(Identificator agentId);
    
    /**
     * Returns the protocol of the service agent
     * registered into the component.
     *
     * @param agentId The identificator of the service agent.
     *
     * @return The protocol associated or null.
     */
    public AbstractProtocol getServiceProtocol(Identificator agentId);
}
